package com.muyu.marketing.bargain.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 砍价记录实体类
 * 
 * @author muyu
 * @date 2025-01-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("bargain_record")
public class BargainRecord extends BaseEntity {
    
    private static final long serialVersionUID = 1L;

    /** 砍价记录ID */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 砍价商品ID */
    @Excel(name = "砍价商品ID")
    private Long bargainProductId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 砍价金额 */
    @Excel(name = "砍价金额")
    private BigDecimal bargainAmount;

    /** 砍价后价格 */
    @Excel(name = "砍价后价格")
    private BigDecimal currentPrice;

    /** 砍价状态：0-进行中，1-已完成，2-已取消 */
    @Excel(name = "砍价状态", readConverterExp = "0=进行中,1=已完成,2=已取消")
    private Integer recordStatus;

    /** 砍价次数 */
    @Excel(name = "砍价次数")
    private Integer bargainCount;

    /** 剩余砍价次数 */
    @Excel(name = "剩余砍价次数")
    private Integer remainingCount;

    /** 是否达到最低价格 */
    @Excel(name = "是否达到最低价格")
    private Integer isMinPrice;

    /** 完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date completeTime;

    /** 砍价开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "砍价开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 砍价结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "砍价结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新人 */
    @Excel(name = "更新人")
    private String updateBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}